package com.ht.enums;

public enum ErrorCode {
   //成功
    SUCCESS(200,"success"),
    //未知错误
    ERROR(500,"未知错误"),
    //用户未找到
    USER_IS_NOT_EXISTS(1001,"用户不存在"),
    //用户名或者密码错误
    USER_IS_NOT_INVALID(1002,"用户名或者密码错误"),
    //用户被禁用
    User_IS_NOT_DISABLED(1003,"用户被禁用"),
    //数据库异常
    DATABASE_ERROR(5001,"数据库异常"),
    //参数异常
    PARAM_ERROR(2001,"参数异常"),

;
    private int code;

    private String msg;

     ErrorCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public String getMsg() {
        return msg;
    }

    public int getCode() {
        return code;
    }
}
